﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IRC.NET.Net
{
    public static class ServerConnectionManager
    {
        private static List<ServerConnectionBase> _Connections = new List<ServerConnectionBase>();

        public static ServerConnectionBase GetConnection(string connectionString)
        {
            ServerConnectionBase connection = new IrcServerConnection(connectionString);
            ServerConnectionManager._Connections.Add(connection);
            return (connection);
        }

        public static void CloseConnections()
        {
            foreach (ServerConnectionBase connection in ServerConnectionManager._Connections)
            {
                connection.Close();
            }
        }
    }
}
